import request from '@/utils/request';

export function getList (params) {
    return request({
        url: '/nsk/lawInfo/list',
        method: 'get',
        params: {
            ...params,
            isAsc: 'desc',
            orderByColumn: 'updateTime'
        }
    });
}

// 新增法律法规
export function createLaw (data) {
    return request({
        url: '/nsk/lawInfo',
        method: 'post',
        data
    });
}

// 删除法律法规
export function deleteLaw (ids) {
    return request({
        url: `/nsk/lawInfo/${ids}`,
        method: 'delete',
    });
}

// 编辑法律法规
export function editLaw (data) {
    return request({
        url: `/nsk/lawInfo`,
        method: 'put',
        data
    });
}